Accusoft.TwainPro9.ActiveX
End a TWAIN Session

The TWAIN Session can be ended at any point. The actions to be taken depend on the state of the session.

During Data Source Selection

OpenDSM or SelectSource has previously been called to open the Data Source Manager. Call CloseSession to close the Data Source Manager and terminate the TWAIN session.

During Capability Negotiation

OpenSession has previously been called to open the Data Source Manager and Data Source. Call CloseSession to close the Data Source and Data Source Manager and terminate the TWAIN session.

During a Scanning Session

StartSession has previously been called to begin a scanning session. The TWAIN session can be terminated during the PreScan or PostScan event by setting the Cancel parameter. The TWAIN session can be cancelled during image transfer or during the PreScan or PostScan events by setting CancelPendingXfers. Either of these actions will cancel all pending image transfers, close the Data Source and the Data Source Manager, and terminate the TWAIN session.

See Also

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback